home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Hardware / Mac OS USB DDK / Mac OS USB DDK 1.4.1 / Examples / CompositeClassDriver / CompositeHIDDriverDescription.c < prev    next >
Encoding:
Text File  |  2000-04-25  |  2.2 KB  |  76 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        CompositeHIDDriverDescription.c
  3.  
  4.     Contains:    Cloned from CompositeDriverDescription.c, rev 15.
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. // Contend from 
  15.  
  16. #include <Types.h>
  17. #include <Devices.h>
  18. #include <DriverServices.h>
  19. #include <USB.h>
  20.  
  21.  
  22. #include "CompositeClassDriver.h"
  23. #include "CompositeClassVersion.h"
  24.  
  25. //------------------------------------------------------
  26. //
  27. //    This is the driver description structure that the expert looks for first.
  28. //  If it's here, the information within is used to match the driver
  29. //  to the device whose descriptor was passed to the expert.
  30. //    Information in this block is also used by the expert when an
  31. //  entry is created in the Name Registry.
  32. //
  33. //------------------------------------------------------
  34. USBDriverDescription    TheUSBDriverDescription = 
  35. {
  36.     // Signature info
  37.     kTheUSBDriverDescriptionSignature,
  38.     kInitialUSBDriverDescriptor,
  39.     
  40.     // Device Info
  41.     0,                                        // vendor = not device specific
  42.     0,                                        // product = not device specific
  43.     0,                                        // version of product = not device specific
  44.     0,                                        // protocol = not device specific
  45.     
  46.     // Interface Info    (* I don't think this would always be required...*)                
  47.     0,                                        // Configuration Value
  48.     0,                                        // Interface Number
  49.     0,                                        // Interface Class
  50.     0,                                         // Interface SubClass
  51.     0,                                        // Interface Protocol
  52.         
  53.     
  54.     // Driver Info
  55.     "\pUSBCompositeHIDDevice"kCMPStringVersShort,// Driver name for Name Registry
  56.     kUSBHIDClass,                            // Device Class
  57.     kUSBCompositeSubClass,                    // Device Subclass 
  58.     kCMPHexMajorVers, 
  59.     kCMPHexMinorVers, 
  60.     kCMPCurrentRelease, 
  61.     kCMPReleaseStage,                        // version of driver
  62.     
  63.     // Driver Loading Info
  64.     kUSBDoNotMatchInterface                    // Please don't load us as an interface driver.
  65. };
  66.  
  67. USBClassDriverPluginDispatchTable TheClassDriverPluginDispatchTable =
  68. {
  69.     kClassDriverPluginVersion,                // Version of this structure
  70.     CompositeDriverValidateHW,                // Hardware Validation Procedure
  71.     CompositeDriverInitialize,                // Initialization Procedure
  72.     CompositeDriverInitInterface,            // Interface Initialization Procedure
  73.     CompositeDriverFinalize,                // Finalization Procedure
  74.     CompositeDriverNotifyProc                // Driver Notification Procedure
  75. };
  76.